﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PaymentMethod.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.ControlPanel.PaymentMethod" %>
<%@ Register TagPrefix="uc1" Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" %>
<!doctype html>
<html>
<head id="Head1" runat="server">
    <title>支付平台管理</title>
    <meta http-equiv="Pragma" content="No-cach"/>
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
</head>
<body>
<form id="Form1" method="post" runat="server">
    <table id="NavigationPath">
        <tr>
            <td>
                管理导航：<a href="PaymentMethod.aspx">平台管理</a> &nbsp;| &nbsp;<a href="PaymentMethod.aspx?Action=Add">
                    添加平台
                </a>
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server"/>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" Visible="False">
                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                    <tr class="HeaderStyle">
                        <td>
                            添加平台
                        </td>
                    </tr>
                    <tr>
                        <td class="border" height="23">
                            <table cellspacing="0" cellpadding="0" class="TabelGrid" width="100%" border="0">
                                <tr>
                                    <td class="RowTitle">
                                        <b>平台名称：</b>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPaymentMethodName" runat="server" Width="336px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请填写"
                                                                    ControlToValidate="txtPaymentMethodName">
                                        </asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="RowTitle">
                                        支付接口：
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlInterface" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlInterface_SelectedIndexChanged">
                                            <asp:ListItem Value="0">-请选择支付接口-</asp:ListItem>
                                            <asp:ListItem Value="1">线下支付</asp:ListItem>
                                            <asp:ListItem Value="2">支付宝支付接口</asp:ListItem>
                                            <asp:ListItem Value="3">网银支付接口(国内)</asp:ListItem>
                                            <asp:ListItem Value="4">Paypal</asp:ListItem>
                                            <asp:ListItem Value="5">贝宝</asp:ListItem>
                                            <asp:ListItem Value="6">网银支付接口(国外)</asp:ListItem>
                                            <asp:ListItem Value="7">快钱支付</asp:ListItem>
                                            <asp:ListItem Value="8">YeePay易宝支付</asp:ListItem>
                                            <asp:ListItem Value="9">IPS易捷支付</asp:ListItem>
                                            <asp:ListItem Value="10">腾讯财付通即时到帐支付</asp:ListItem>
                                            <asp:ListItem Value="11">支付宝鲜花支付接口</asp:ListItem>
                                            <asp:ListItem Value="12">腾讯财付通中介担保支付</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink1" runat="server" Target="_blank"/>
                                    </td>
                                </tr>
                                <tr runat="server" id="trAccountsID">
                                    <td class="RowTitle">
                                        商户ID：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAccountsID" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请填写"
                                                                    ControlToValidate="txtAccountsID">
                                        </asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr runat="server" id="trMD5">
                                    <td class="RowTitle">
                                        私钥：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtMD5" runat="server" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr runat="server" id="trParentId" visible="false">
                                    <td class="RowTitle">
                                        ParentId：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtParentId" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr runat="server" id="treMail" visible="false">
                                    <td class="RowTitle">
                                        eMail：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txteMail" runat="server" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr style="display: none">
                                    <td class="RowTitle">
                                        手续费率：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtRate" runat="server">100</asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="请填写"
                                                                    ControlToValidate="txtRate">
                                        </asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="RowTitle">
                                        设为默认：
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="cbkIsDefault" runat="server"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="RowTitle">
                                        <b>立即审核：</b>
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="cbkPass" runat="server"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" colspan="2">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <p align="center">
                    <asp:Button ID="btnOK" runat="server" Text="添加" OnClick="btnOK_Click" Cssclass="btn btn-default">
                    </asp:Button>&nbsp;&nbsp;
                    <asp:Button ID="btnEdit" runat="server" Visible="False" Text="修改" OnClick="btnEdit_Click"
                                Cssclass="btn btn-default">
                    </asp:Button><asp:Button ID="btnBack" runat="server" Text="返回" OnClick="btnBack_Click"
                                             Cssclass="btn btn-default" ValidationGroup="back">
                    </asp:Button>
                </p>
            </asp:Panel>
            <asp:Panel ID="Panel2" runat="server" Width="99%">
                <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                              OnRowCommand="GV_List_RowCommand" OnRowDeleting="GV_List_RowDeleting" OnRowDataBound="GV_List_RowDataBound" GridLines="None" CssClass="table table-bordered table-condensed table-hover">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server"/>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="40px"/>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MethodName" HeaderText="平台名称"/>
                        <asp:TemplateField HeaderText="接口类型">
                            <ItemTemplate>
                                <%# PayPlat(Eval("Rate")) %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" Width="250px"/>
                        </asp:TemplateField>
                        <asp:ButtonField DataTextField="Pass" HeaderText="审核" Text="审核" CommandName="Pass">
                            <ItemStyle HorizontalAlign="Center" Width="60px"/>
                        </asp:ButtonField>
                        <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="PaymentMethod.aspx?Action=Edit&amp;ID={0}"
                                            HeaderText="编辑" Text="编辑">
                            <ItemStyle HorizontalAlign="Center" Width="40px"/>
                        </asp:HyperLinkField>
                        <asp:CommandField HeaderText="删除" ShowDeleteButton="True">
                            <ItemStyle HorizontalAlign="Center" Width="40px"/>
                        </asp:CommandField>
                    </Columns>
                    <HeaderStyle CssClass="HeaderStyle"/>
                </asp:GridView>
                <table style="width: 100%;">
                    <tr>
                        <td class="style1">
                            <input id="Checkbox1" onclick=" javascript:SelectAll(this); " type="checkbox"/>全选
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                            <asp:Button ID="DelSeletedID" runat="server" Text="删除选中" OnClick="DelSeletedID_Click"
                                        Cssclass="btn btn-default">
                            </asp:Button>
                        </td>
                    </tr>
                </table>

            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</form>
</body>
</html>